package com.example.snakefinal;

import android.graphics.Point;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Message {
    public static class BasicMsg {
        String type;
    }

    public static class HelloMsg extends BasicMsg {
        int skinResource;
    }

    public static class JoinMsg extends BasicMsg {
        String name;
    }

    // 移动方向
    public static class MoveMsg extends BasicMsg {
        Snake.Heading heading;
    }

    public static class AllInfo extends BasicMsg {
        Map<String,SnakeData> snakes = new HashMap<>();
        List<Point> wall = new ArrayList<>();
        List<Point> huo = new ArrayList<>();
        List<Food> foods = new ArrayList<>();
        GAME_STATE state = GAME_STATE.START_SCREEN;

        int weather = 0;
    }

    public static class SnakeData {
        public Snake.Heading heading;
        public int score;
        public int skinResource;
        public ArrayList<Point> segmentLocations;
        String  name = "";
    }
}
